FROM openjdk:8
MAINTAINER pader "478119414@qq.com"
RUN set -x \
    && ln -snf /usr/share/zoneinfo/$TIME_ZONE /etc/localtime && echo '$TIME_ZONE' > /etc/timezone 
VOLUME /opt/seata/conf
VOLUME /opt/seata/logs
ADD seata /opt/seata
ENV SEATA_USER="seata" \
	BASE_DIR=/opt/seata \
    TIME_ZONE="Asia/Shanghai" \
    SERVER_PORT="8091" \
    CLUSTER_NUM=1
ENV JVM_XMX=1024m \
    JVM_XMS=1024m \
    JVM_XMN=512m \
    JVM_XSS=256K \
    JVM_MS=64m \
    JVM_MMS=128m \
    JVM_MDMS=512m
RUN chmod 755 /opt/seata/bin/seata-server.sh
WORKDIR $BASE_DIR
EXPOSE 8881
ENTRYPOINT ["sh", "-c", "/opt/seata/bin/seata-server.sh"]
